Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Container-Runtime to 0.15 #286

Merged
merged 3 commits into from
Aug 10, 2023
Merged

Conversation

jaydeokar
Copy link
Contributor

@jaydeokar jaydeokar commented Aug 1, 2023

Issue #, if available:
#277

Description of changes:
Upgrade to controller-runtime 1.15 for kubernetes-sigs/controller-runtime#2116, which will help with startup latency when operators like Crossplane are installed.

Makefile:71: warning: overriding recipe for target `image'
Makefile:46: warning: ignoring old recipe for target `image'
go mod tidy
go generate ./...
go vet ./...
go fmt ./...
controller-gen crd:trivialVersions=true rbac:roleName=controller-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
controller-gen object:headerFile="scripts/templates/boilerplate.go.txt" paths="./..."
go test ./pkg/... ./controllers/... ./webhooks/... -coverprofile cover.out
?   	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/api	[no test files]
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/aws/ec2	0.038s	coverage: 85.2% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/aws/ec2/api	0.075s	coverage: 45.4% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/aws/vpc	0.012s	coverage: [no statements]
?   	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/provider	[no test files]
?   	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/version	[no test files]
?   	github.com/aws/amazon-vpc-resource-controller-k8s/controllers/custom	[no test files]
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/condition	21.035s	coverage: 48.5% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/config	0.009s	coverage: 90.7% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/handler	0.039s	coverage: 66.2% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/healthz	14.048s	coverage: 57.1% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/k8s	0.374s	coverage: 60.0% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/k8s/pod	0.029s	coverage: 53.5% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/node	0.029s	coverage: 91.9% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/node/manager	0.150s	coverage: 84.8% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/pool	0.031s	coverage: 89.1% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/provider/branch	0.040s	coverage: 54.5% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/provider/branch/trunk	0.076s	coverage: 88.6% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/provider/ip	0.090s	coverage: 46.7% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/provider/ip/eni	0.122s	coverage: 93.5% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/provider/prefix	0.028s	coverage: 51.6% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/resource	0.030s	coverage: 75.3% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/utils	5.288s	coverage: 80.0% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/pkg/worker	0.204s	coverage: 81.5% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/controllers/apps	0.020s	coverage: 78.6% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/controllers/core	0.038s	coverage: 72.2% of statements
ok  	github.com/aws/amazon-vpc-resource-controller-k8s/webhooks/core	0.045s	coverage: 85.1% of statements

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jaydeokar jaydeokar requested a review from a team as a code owner August 1, 2023 05:00
Copy link
Contributor

@jdn5126 jdn5126 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes overall LGTM. Can we attach the results from the integration tests somewhere in the PR?

config/controller/controller.yaml Show resolved Hide resolved
main.go Show resolved Hide resolved
main.go Show resolved Hide resolved
test/framework/resource/k8s/pod/manager.go Show resolved Hide resolved
@jaydeokar
Copy link
Contributor Author

Before controller runtime update, it takes about ~40 secs to build the cache

{"level":"info","timestamp":"2023-08-08T16:52:18.200Z","logger":"setup","msg":"starting the controller with leadership setting","leader mode enabled":true,"lease duration(s)":30,"renew deadline(s)":15,"retry period(s)":5}
I0808 16:52:19.301415      11 request.go:690] Waited for 1.059349404s due to client-side throttling, not priority and fairness, request: GET:https://10.0.166.115:443/apis/aws.upbound.io/v1alpha1?timeout=32s
I0808 16:52:29.401430      11 request.go:690] Waited for 11.158833215s due to client-side throttling, not priority and fairness, request: GET:https://10.0.166.115:443/apis/cloudcontrol.aws.upbound.io/v1beta1?timeout=32s
I0808 16:52:39.501913      11 request.go:690] Waited for 21.258481311s due to client-side throttling, not priority and fairness, request: GET:https://10.0.166.115:443/apis/networkmanagement.gcp.upbound.io/v1beta1?timeout=32s
I0808 16:52:49.511048      11 request.go:690] Waited for 7.897228746s due to client-side throttling, not priority and fairness, request: GET:https://10.0.166.115:443/apis/docdb.aws.upbound.io/v1beta1?timeout=32s
I0808 16:52:59.610729      11 request.go:690] Waited for 17.996620382s due to client-side throttling, not priority and fairness, request: GET:https://10.0.166.115:443/apis/privateca.gcp.upbound.io/v1beta1?timeout=32s
{"level":"info","timestamp":"2023-08-08T16:53:05.022Z","logger":"controller-runtime.metrics","msg":"Metrics server is starting to listen","addr":"127.0.0.1:8443"}

After controller runtime update with lazy loading of resources

{"level":"info","timestamp":"2023-08-08T17:09:40.707Z","logger":"setup","msg":"version","GitVersion":"v1.3.0-6-gf4a3ff1","GitCommit":"f4a3ff12bb69870c7db91f1112430f128486dd52","BuildDate":"2023-08-07T20:15:06+0000"}
{"level":"info","timestamp":"2023-08-08T17:09:40.708Z","logger":"setup","msg":"starting the controller with leadership setting","leader mode enabled":true,"lease duration(s)":30,"renew deadline(s)":15,"retry period(s)":5}
{"level":"info","timestamp":"2023-08-08T17:09:40.709Z","logger":"controller-runtime.metrics","msg":"Metrics server is starting to listen","addr":"127.0.0.1:8443"}

@jaydeokar
Copy link
Contributor Author

jaydeokar commented Aug 9, 2023

Changes overall LGTM. Can we attach the results from the integration tests somewhere in the PR?

I've tested this for 1.21 - 1.28 internally.
Here's the result for 1.27 tests

Running Suite: Per Pod Security Group Suite

[AfterSuite] PASSED [90.818 seconds]
------------------------------
Ran 19 of 23 Specs in 1449.629 seconds
SUCCESS! -- 19 Passed | 0 Failed | 0 Pending | 4 Skipped
PASS
Ginkgo ran 1 suite in 28m30.671368263s
Test Suite Passed

Validating WebHook Test Suite

[AfterSuite] PASSED [110.788 seconds]
------------------------------
Ran 11 of 11 Specs in 139.458 seconds
SUCCESS! -- 11 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS
Ginkgo ran 1 suite in 2m24.110270155s
Test Suite Passed
Successfully ran all tests in 31 minutes and 20 seconds

@jaydeokar
Copy link
Contributor Author

Windows test suite on 1.27
Running Suite: Windows Integration Test Suite

------------------------------
Ran 25 of 28 Specs in 5190.795 seconds
SUCCESS! -- 25 Passed | 0 Failed | 0 Pending | 3 Skipped
PASS

Ginkgo ran 1 suite in 1h26m40.038982957s
Test Suite Passed

Makefile Outdated Show resolved Hide resolved
@jdn5126 jdn5126 merged commit 3dda523 into aws:master Aug 10, 2023
2 checks passed
@jaydeokar jaydeokar deleted the container_runtime branch August 10, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants